home *** CD-ROM | disk | FTP | other *** search
/ Ultra Gameplayers 101 / Ultra Game Players Magazine, No. 101 - September 1997 (Imagine Publishing, Inc.)(1997).iso / pc / new_ugp.dxr / 00282_Text Slide Button Class.ls < prev    next >
Encoding:
Text File  |  1997-07-10  |  596 b   |  31 lines

  1. property textDisplay, scrollDirection, ancestor
  2.  
  3. on new me, paramList
  4.   set scrollDirection to getProp(paramList, #scrollDirection)
  5.   set textDisplay to the textDisplay of the currMenu of GetGlobal(#gTitleObject)
  6.   return me
  7. end
  8.  
  9. on TurnOn me
  10.   if scrollDirection = #up then
  11.     repeat while the mouseDown
  12.       ScrollLines(textDisplay, -1)
  13.     end repeat
  14.   else
  15.     repeat while the mouseDown
  16.       ScrollLines(textDisplay, 1)
  17.     end repeat
  18.   end if
  19. end
  20.  
  21. on TurnOff me
  22. end
  23.  
  24. on dispose me
  25.   set textDisplay to 0
  26.   if objectp(ancestor) then
  27.     dispose(ancestor)
  28.   end if
  29.   set ancestor to 0
  30. end
  31.